﻿<UserControl x:Class="CPPEI.Coolzon.Theme.Default.MainViewControl.ControlPanel"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="750" d:DesignWidth="247">
    <Grid x:Name="gdLayout">
        <Grid.Background>
            <ImageBrush ImageSource="/CPPEI.Coolzon.Theme.Default;component/Images/right-bg.jpg" Stretch="UniformToFill"/>
        </Grid.Background>
        <Grid.Resources>
            <Style TargetType="Button" x:Key="SceneImageSmall">
                <!--修改模板属性-->
                <Setter Property="Template">
                    <Setter.Value>
                        <!--控件模板-->
                        <ControlTemplate TargetType="Button">
                            <!--背景色-->
                            <Border x:Name="back" Opacity="0.8" CornerRadius="3">
                                <Border.BitmapEffect>
                                    <OuterGlowBitmapEffect Opacity="0.7" GlowSize="0" GlowColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Button.Background).(SolidColorBrush.Color)}"/>
                                </Border.BitmapEffect>
                                <Border.Background>
                                    <ImageBrush ImageSource="/CPPEI.Coolzon.Theme.Default;component/Images/button-left.png" Stretch="Fill"/>
                                </Border.Background>
                            </Border>
                            <!--触发器-->
                            <ControlTemplate.Triggers>
                                <!--按钮按下弹起-->
                                <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Background" TargetName="back">
                                        <Setter.Value>
                                            <ImageBrush ImageSource="/CPPEI.Coolzon.Theme.Default;component/Images/button-lefta.png" Stretch="Fill"/>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <!--按钮失效-->
                                <Trigger Property="IsEnabled" Value="False">
                                    <Setter Property="Foreground" Value="#B444"/>
                                    <Trigger.EnterActions>
                                        <BeginStoryboard>
                                            <Storyboard>
                                                <DoubleAnimation To="0" Duration="0:0:0.3" Storyboard.TargetName="back" Storyboard.TargetProperty="(Border.BitmapEffect).(OuterGlowBitmapEffect.GlowSize)"/>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.EnterActions>
                                    <Trigger.ExitActions>
                                        <BeginStoryboard>
                                            <Storyboard>
                                                <DoubleAnimation Duration="0:0:0.1" Storyboard.TargetName="back" Storyboard.TargetProperty="(Border.BitmapEffect).(OuterGlowBitmapEffect.GlowSize)"/>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.ExitActions>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style TargetType="Button" x:Key="SceneImageBig">
                <!--修改模板属性-->
                <Setter Property="Template">
                    <Setter.Value>
                        <!--控件模板-->
                        <ControlTemplate TargetType="Button">
                            <!--背景色-->
                            <Border x:Name="back" Opacity="0.8" CornerRadius="3">
                                <Border.BitmapEffect>
                                    <OuterGlowBitmapEffect Opacity="0.7" GlowSize="0" GlowColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Button.Background).(SolidColorBrush.Color)}"/>
                                </Border.BitmapEffect>
                                <Border.Background>
                                    <ImageBrush ImageSource="/CPPEI.Coolzon.Theme.Default;component/Images/button-right.png" Stretch="Fill"/>
                                </Border.Background>
                            </Border>
                            <!--触发器-->
                            <ControlTemplate.Triggers>
                                <!--按钮按下弹起-->
                                <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Background" TargetName="back">
                                        <Setter.Value>
                                            <ImageBrush ImageSource="/CPPEI.Coolzon.Theme.Default;component/Images/button-righta.png" Stretch="Fill"/>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <!--按钮失效-->
                                <Trigger Property="IsEnabled" Value="False">
                                    <Setter Property="Foreground" Value="#B444"/>
                                    <Trigger.EnterActions>
                                        <BeginStoryboard>
                                            <Storyboard>
                                                <DoubleAnimation To="0" Duration="0:0:0.3" Storyboard.TargetName="back" Storyboard.TargetProperty="(Border.BitmapEffect).(OuterGlowBitmapEffect.GlowSize)"/>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.EnterActions>
                                    <Trigger.ExitActions>
                                        <BeginStoryboard>
                                            <Storyboard>
                                                <DoubleAnimation Duration="0:0:0.1" Storyboard.TargetName="back" Storyboard.TargetProperty="(Border.BitmapEffect).(OuterGlowBitmapEffect.GlowSize)"/>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.ExitActions>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style TargetType="TextBlock">
                <Setter Property="Foreground" Value="White" />
            </Style>
            <Style TargetType="CheckBox">
                <Setter Property="Height" Value="18"/>
                <Setter Property="Foreground" Value="White"/>
                <Setter Property="FontWeight" Value="Bold"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type CheckBox}">
                            <Border x:Name="ForegroundPanel" CornerRadius="2" BorderBrush="Black" BorderThickness="1" Padding="0">
                                <DockPanel>
                                    <TextBlock x:Name="Content" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="2,0" Width="25" />
                                    <Border x:Name="CheckFlag" HorizontalAlignment="Right" VerticalAlignment="Center" CornerRadius="2" BorderThickness="0" Width="25" Height="16"/>
                                </DockPanel>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter TargetName="Content" Property="Text" Value="关"/>
                                    <Setter TargetName="ForegroundPanel" Property="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="Gray" Offset="0.0"/>
                                                <GradientStop Color="Green" Offset="0.5"/>
                                                <GradientStop Color="Gray" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter TargetName="CheckFlag" Property="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="WhiteSmoke" Offset="0.0"/>
                                                <GradientStop Color="Green" Offset="0.5"/>
                                                <GradientStop Color="WhiteSmoke" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter TargetName="Content" Property="DockPanel.Dock" Value="Left"/>
                                    <Setter TargetName="CheckFlag" Property="DockPanel.Dock" Value="Right"/>
                                </Trigger>
                                <Trigger Property="IsChecked" Value="False">
                                    <Setter TargetName="Content" Property="Text" Value="开"/>
                                    <Setter TargetName="ForegroundPanel" Property="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="Gray" Offset="0.0"/>
                                                <GradientStop Color="Silver" Offset="0.5"/>
                                                <GradientStop Color="Gray" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter TargetName="CheckFlag" Property="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="WhiteSmoke" Offset="0.0"/>
                                                <GradientStop Color="Silver" Offset="0.5"/>
                                                <GradientStop Color="WhiteSmoke" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter TargetName="Content" Property="DockPanel.Dock" Value="Right"/>
                                    <Setter TargetName="CheckFlag" Property="DockPanel.Dock" Value="Left"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="15"></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition Width="15"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="43"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="323"></RowDefinition>
            <RowDefinition Height="300"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <!--第一行-->
        <Image Grid.Row="0"  Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top" Width="38" Cursor="Hand" Source="/CPPEI.Coolzon.Theme.Default;component/Images/set.png" Margin="0,2,0,0" Height="37" MouseLeftButtonDown="Image_MouseLeftButtonDown" />

        <!--第二行-->
        <TextBlock Grid.Row="1"  Grid.Column="1" Text="当前频道：" HorizontalAlignment="Left" Margin="5,11,0,0" VerticalAlignment="Top" Width="60" Height="16" />
        <TextBlock  Grid.Row="1" Grid.Column="1" x:Name="tbPosion" HorizontalAlignment="Left" Margin="69,10,0,8" VerticalAlignment="Top" TextWrapping="Wrap"/>

        <!--第三行-->
        <ScrollViewer PanningMode="VerticalOnly" Foreground="White" Grid.Row="2" Grid.Column="1" Height="315" VerticalAlignment="Top">
            <RichTextBox x:Name="tbComments" IsReadOnly="True"
                     VerticalScrollBarVisibility="Hidden" Width="206">
                <RichTextBox.Background>
                    <ImageBrush ImageSource="/CPPEI.Coolzon.Theme.Default;component/Images/text.png"/>
                </RichTextBox.Background>
            </RichTextBox>
        </ScrollViewer>
        <Image Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="17" Width="17" Source="/CPPEI.Coolzon.Theme.Default;component/Images/text-left.png" Margin="0,0,0,11"/>
        <Image Grid.Column="1" Grid.Row="2"  HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="17" Width="17" Source="/CPPEI.Coolzon.Theme.Default;component/Images/text-right.png" Margin="0,0,15,8" />

        <!--第四行-->
        <Grid Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Top" Height="212"  Width="210" Margin="3,0,4,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="17"></ColumnDefinition>
                <ColumnDefinition Width="180"></ColumnDefinition>
                <ColumnDefinition Width="17"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="86"></RowDefinition>
                <RowDefinition Height="200"></RowDefinition>
            </Grid.RowDefinitions>
            <Image Grid.Column="1" Grid.Row="0" Height="86" Width="120" HorizontalAlignment="Center" VerticalAlignment="Center" Source="/CPPEI.Coolzon.Theme.Default;component/Images/button-faimly.png" Margin="30,0"/>
            <Button x:Name="bttPre" HorizontalAlignment="Left" Grid.Row="0" VerticalAlignment="Center" Height="38" Width="41" Style="{StaticResource SceneImageSmall}" Cursor="Hand"  Grid.Column="1" Margin="29,26,0,22" Click="bttPre_Click"/>
            <Button x:Name="btnNext" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Center" Height="54" Width="58" Style="{StaticResource SceneImageBig}" Cursor="Hand"   Margin="0,17,35,15" Click="btnNext_Click"/>

            <StackPanel Grid.Column="1" Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Top">
                <StackPanel Grid.Column="1" Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Top" Width="114">
                    <StackPanel Orientation="Horizontal" Height="35">
                        <CheckBox x:Name="isAutoPlay" Foreground="White" HorizontalAlignment="Center"/>
                        <Label Content="循环播放" Foreground="White"  VerticalAlignment="Center" Height="25" HorizontalContentAlignment="Center" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Height="35">
                        <CheckBox x:Name="isMagnifier" Foreground="White" HorizontalAlignment="Center" />
                        <Label Content="放大镜" Foreground="White"  VerticalAlignment="Center" Height="25" HorizontalContentAlignment="Center" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Height="35">
                        <CheckBox x:Name="isPen" Foreground="White" HorizontalAlignment="Center" />
                        <Label Content="激光笔" Foreground="White"  VerticalAlignment="Center" Height="25" HorizontalContentAlignment="Center" />
                    </StackPanel>
                </StackPanel>
            </StackPanel>
        </Grid>

        <!--第五行-->
        <StackPanel x:Name="subScene" Grid.Column="1" Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Center">
        </StackPanel>
    </Grid>
</UserControl>
